package com.bwie.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bwie.pojo.TbOrder;
import com.bwie.service.TbOrderService;
import com.bwie.mapper.TbOrderMapper;
import com.bwie.utils.R;
import com.bwie.vo.PageInfoVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
* @author andy
* @description 针对表【tb_order(订单表)】的数据库操作Service实现
* @createDate 2025-07-21 15:23:45
*/
@Service
public class TbOrderServiceImpl extends ServiceImpl<TbOrderMapper, TbOrder>
    implements TbOrderService{
    @Autowired
    TbOrderMapper orderMapper;
    /**
     * @author LiuWeiChen
     * @description 分页查询订单列表
     * @params [pageInfoVo]
     * @return com.bwie.utils.R
     * @date 2025/7/23 10:36
    */
    @Override
    public R getPageListOrder(PageInfoVo pageInfoVo) {
        Page<TbOrder> page = new Page<>(pageInfoVo.getPageNum(), pageInfoVo.getPageSize());
        LambdaQueryWrapper<TbOrder> wrapper = new LambdaQueryWrapper<>();
        Page<TbOrder> tbOrderPage = orderMapper.selectPage(page,wrapper );
        return R.OK(tbOrderPage);
    }

}




